//
//  LoginPresenter.m
//  MVP
//
//  Created by 曹敬贺 on 16/8/4.
//  Copyright © 2016年 北京无限点乐科技有限公司. All rights reserved.
//

#import "LoginPresenter.h"
#import "User.h"

@implementation LoginPresenter



- (void)loginClick
{
    NSString * userName = [self.delegate userName];
    NSString * userPassword = [self.delegate userPassword];
    User * user = [[User alloc]init];
    user.name = userName;
    user.password = userPassword;
    BOOL LoginState = random()%2;
    if (LoginState) {
        NSLog(@"userName:%@  userPassword:%@",userName,userPassword);
        [self.delegate updateUI:LoginSuccess With:user];
    }else
    {
        [self.delegate updateUI:LoginFailed With:user];
    }
}

@end
